package com.diors.game.engine.arpg.skill;

import java.util.Collection;
import java.util.List;

import com.diors.game.engine.arpg.object.AbstractObject;
import com.diors.game.engine.arpg.skill.find.AbstractSkillTarget;
import com.diors.game.engine.arpg.skill.find.FindTarget;
import com.diors.game.engine.arpg.skill.model.SkillBuffModel;
import com.diors.game.engine.arpg.skill.model.SkillEffectModel;
import com.diors.game.engine.arpg.skill.shape.AbstractScope;

/**
 * 技能引擎
 * @author	darren.ouyang <ouyang.darren@gmail.com>
 * @date	2013-10-29
 * @version 1.0
 * @copyright Copyright (c) 2013, darren.ouyang
 */
public class SkillEngine 
{

	static Collection<AbstractObject> findTarget (FindTarget ft, AbstractSkillTarget st)
	{
		Collection<AbstractObject> list = st.findTarget(ft);
		return list;
	}
	
	public static void caseSkill (AbstractObject attack, SkillEffectModel model)
	{
		AbstractScope scope = model.getScope();
		List<AbstractObject> targets = scope.scopeTargets();
		for (AbstractObject target : targets)
			caseSkillTarget(attack, target, model);
	}
	
	
	
	private static void caseSkillTarget (AbstractObject attack, AbstractObject target, SkillEffectModel model)
	{
		/*AbstractEffect effect = model.getEffect();
		effect.cast(attack, target, model);*/
	}
	
	public static void caseTriggerSkill ()
	{
		
	}
	
	/**
	 * 释放BUFF
	 * @param attack
	 * @param target
	 * @param buffModel
	 * @author	darren.ouyang
	 * @create	2013年12月5日 下午3:28:48
	 */
	public static void caseBuffSkill (AbstractObject attack, AbstractObject target, SkillBuffModel buffModel)
	{
		
	}
	
	public static SkillBuffModel getBuffModel (int buffID)
	{
		
		return null;
	}
}
